<?php

require_once('Adept/ClassKit/Delegate/Interface.php');

class Adept_ClassKit_Delegate_Static implements Adept_ClassKit_Delegate_Interface 
{
    
    protected $class;
    protected $method;
    
    public function __construct($class, $method) 
    {
        $this->class = $class;
        $this->method = $method;
    }
    
    public function invoke($args) 
    {
        if (!class_exists($this->class)) {
            require_once($this->class);
        }
        return call_user_func_array(array($this->class, $this->method), $args);
    }
    
}
